package com.gongren.project.job.oss;

import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.gongren.oms.service.project.statement.IProjectStatementService;

@Component("statementTask")
public class StatementTask {
	private static Logger LOGGER = LoggerFactory.getLogger(StatementTask.class);

	@Reference
	private IProjectStatementService projectStatementServiceImpl;
	/**
	 * 每天0点执行生成对账单 Author: zhcy Date: 2017年12月4日 下午1:43:23
	 * 
	 * @see [相关类/方法](可选)
	 * @since [产品/模块版本](可选)
	 */
	public void excuteStatementTask() {
		LOGGER.info("statementTask and excuteStatementTask start");
		try {
			projectStatementServiceImpl.initStatement(new Date());
			LOGGER.info("statementTask and excuteStatementTask end");
		} catch (Exception e) {
			LOGGER.error("statementTask and excuteStatementTask：", e);
		}
	}
}
